USE [HomestayWebDB]
GO
/****** Object:  StoredProcedure [dbo].[Store_Post_GetPostOfUser]    Script Date: 12/16/2012 12:29:28 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
  
ALTER PROCEDURE [dbo].[Store_Post_GetPostOfUser]  
 @Username varchar(20)  
AS  
BEGIN  
 SELECT p.IsAvailable, 
		p.PostID,
		p.PostStatus,
		p.TimeCreated,
		p.Title, 
		p.PostAvatar   --Ko map voi ben kia
 FROM Posts p
 WHERE p.Username = @Username
    AND p.IsDeleted = 'False' --Check Role later  
 ORDER BY p.PostID DESC  
END  